home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / hello1_3.lha / hello-1.3 / Makefile.in < prev    next >
Makefile  |  1993-05-22  |  3KB  |  124 lines

  1. # Makefile for GNU hello.    -*- Indented-Text -*-
  2. # Copyright (C) 1992, 1993 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. #### Start of system configuration section. ####
  19.  
  20. VPATH = @srcdir@
  21. srcdir = $(VPATH)
  22.  
  23. CC = @CC@
  24.  
  25. INSTALL = @INSTALL@
  26. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  27. INSTALL_DATA = @INSTALL_DATA@
  28. MAKEINFO = makeinfo
  29. TEXI2DVI = texi2dvi
  30.  
  31. DEFS = @DEFS@
  32. LIBS = @LIBS@
  33.  
  34. CFLAGS = -g
  35. LDFLAGS = -g
  36.  
  37. prefix = /usr/local
  38. exec_prefix = $(prefix)
  39.  
  40. bindir = $(exec_prefix)/bin
  41. infodir = $(prefix)/info
  42.  
  43. # Prefix to be prepended to each installed program, normally empty or `g'.
  44. binprefix = 
  45.  
  46. #### End of system configuration section. ####
  47.  
  48. SHELL = /bin/sh
  49.  
  50. SRCS = hello.c version.c getopt.c getopt1.c alloca.c
  51. OBJS = hello.o version.o getopt.o getopt1.o @ALLOCA@
  52. HDRS = getopt.h
  53. DISTFILES = $(SRCS) $(HDRS) COPYING ChangeLog NEWS Makefile.in \
  54.         README INSTALL hello.texi hello.?? hello.??s gpl.texinfo \
  55.         configure configure.in \
  56.         mkinstalldirs texinfo.tex hello.info testdata TAGS
  57.  
  58. all: hello
  59. .PHONY: all
  60.  
  61. .PHONY: info dvi
  62. info: hello.info
  63. dvi: hello.dvi
  64.  
  65. .c.o:
  66.     $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
  67.  
  68. .PHONY: install installdirs
  69. install: installdirs hello hello.info
  70.     $(INSTALL_PROGRAM) hello $(bindir)/$(binprefix)hello
  71.     -$(INSTALL_DATA) $(srcdir)/hello.info $(infodir)/hello.info
  72. installdirs:
  73.     ${srcdir}/mkinstalldirs $(bindir) $(infodir)
  74.  
  75. hello: $(OBJS)
  76.     $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  77.  
  78. hello.o getopt.o getopt1.o: getopt.h
  79.  
  80. hello.info: hello.texi
  81.     $(MAKEINFO) -I$(srcdir) -o hello.info $(srcdir)/hello.texi
  82. hello.dvi: hello.texi
  83.     $(TEXI2DVI) $(srcdir)/hello.texi
  84.  
  85. .PHONY: check
  86. check: hello
  87.     @echo expect no output from diff
  88.     ./hello > test.out
  89.     diff -c $(srcdir)/testdata test.out
  90.     rm -f test.out
  91.  
  92. Makefile: Makefile.in config.status
  93.     $(SHELL) config.status
  94.  
  95. config.status: configure
  96.     $(srcdir)/configure --no-create
  97.  
  98. TAGS: $(SRCS)
  99.     etags $(SRCS)
  100.  
  101. .PHONY: clean mostlyclean distclean realclean dist
  102.  
  103. clean:
  104.     rm -f hello *.o core test.out hello.dvi hello.?? hello.??s
  105.  
  106. mostlyclean: clean
  107.  
  108. distclean: clean
  109.     rm -f Makefile config.status
  110.  
  111. realclean: distclean
  112.     rm -f TAGS hello.info*
  113.  
  114. dist: $(DISTFILES)
  115.     echo hello-`sed -e '/version/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  116.     rm -rf `cat .fname`
  117.     mkdir `cat .fname`
  118.     ln $(DISTFILES) `cat .fname`
  119.     tar chozf `cat .fname`.tar.z `cat .fname`
  120.     rm -rf `cat .fname` .fname
  121.  
  122. # Prevent GNU make v3 from overflowing arg limit on SysV.
  123. .NOEXPORT:
  124.